package com.mission.schedule.adapter;
//ChangYongYuAdapter
import java.util.List;

import com.mission.schedule.CommonDialog.ReminderEditDialog;
import com.mission.schedule.adapter.utils.CommonAdapter;
import com.mission.schedule.adapter.utils.ViewHolder;
import com.mission.schedule.bean.CYTXBean;
import com.mission.schedule.bean.ChangYongBean;
import com.mission.schedule.R;

import android.content.Context;
import android.os.Handler;
import android.os.Message;
import android.view.View;
import android.view.WindowManager;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import android.widget.TextView;

public class ChangYongYuAdapter extends CommonAdapter<CYTXBean.QcBean>{

	Context context;
	WindowManager windowManager;
	Handler handler;
	public ChangYongYuAdapter(Context context, List<CYTXBean.QcBean> lDatas,
			int layoutItemID, WindowManager windowManager, Handler handler) {
		super(context, lDatas, layoutItemID);

		this.windowManager = windowManager;
		this.handler = handler;
	}

	@Override
	public void getViewItem(ViewHolder holder,CYTXBean.QcBean item,final int position) {
		TextView content_tv = holder.getView(R.id.content_tv);
		TextView title_tv = holder.getView(R.id.title_tv);
		title_tv.setText(item.timetype);
		content_tv.setText(item.time);

		holder.getView(R.id.bianji).setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				Message message = new Message();
				message.what = 2;
				message.arg2 = position;
				handler.sendMessage(message);
			}
		});
	}

}
